import { http, jumpExport } from '@/utils/http/axios';

// 获取商品中心列表
export function List(params) {
  return http.request({
    url: '/product/list',
    method: 'get',
    params,
  });
}

// 添加/编辑商品中心
export function Edit(params) {
  return http.request({
    url: '/product/edit',
    method: 'POST',
    params,
  });
}

// 修改商品中心状态
export function Status(params) {
  return http.request({
    url: '/product/status',
    method: 'POST',
    params,
  });
}

// 获取商品中心指定详情
export function View(params) {
  return http.request({
    url: '/product/view',
    method: 'GET',
    params,
  });
}

// 获取商品分类列表
export function categoryList(params) {
  return http.request({
    url: '/product/category/list',
    method: 'GET',
    params,
  });
}

// 修改/新增商品分类
export function addCategory(params) {
  return http.request({
    url: '/product/category/edit',
    method: 'POST',
    params,
  });
}

// 获取商品分类指定信息
export function categoryView(params) {
  return http.request({
    url: '/product/category/view',
    method: 'GET',
    params,
  });
}

// 更新商品分类状态
export function updateStatus(params) {
  return http.request({
    url: '/product/category/status',
    method: 'POST',
    params,
  });
}

// 获取商品分类下拉列表
export function categoryAll(params) {
  return http.request({
    url: '/product/category/all',
    method: 'GET',
    params,
  });
}